/**
 * 评委管理相关API接口
 * 文档地址：https://s.apifox.cn/6b270d33-7c6d-461d-9e8d-feaf10324057/370661545e0.md
 */

import axios from 'axios'

export default {
  /**
   * 评委列表
   * @param {Object} params - 查询参数 {page, limit, ...}
   * @returns {Promise}
   */
  list(params) {
    return axios.get('/manage/project.ProjectJudge/index', { params })
  },

  /**
   * 添加/修改评委
   * @param {Object} data - 评委数据
   * @returns {Promise}
   */
  createOrUpdate(data) {
    return axios.post('/manage/project.ProjectJudge/save', data)
  },

  /**
   * 删除评委
   * @param {Object} params - {id: 评委ID}
   * @returns {Promise}
   */
  delete(params) {
    return axios.get('/manage/project.ProjectJudge/delete', { params })
  },

  /**
   * 评委详情
   * @param {Object} params - {id: 评委ID}
   * @returns {Promise}
   */
  detail(params) {
    return axios.get('/manage/project.ProjectJudge/read', { params })
  }
}

